package com.it.data.manager

import DictVo
import android.util.Log

object DataManager {
    val dictMap = HashMap<String, List<DictVo>>()
    const val TAG = "DataManager"
    fun formatDouble(number: Double): String {
        Log.d(TAG, "formatDouble: ${number}")
        val formattedNumber = "%.2f".format(number)
        return if (formattedNumber.indexOf('.') >= 0) {
            formattedNumber.removeSuffix(".0").removeSuffix(".00")
        } else {
            formattedNumber
        }
    }

}